package com.fang;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}

	/**
	 * 一旦加载了spring-security的jar包，就会自动的加载了登录拦截
	 * 
	 * @return
	 */
	@GetMapping("/hello")
	public String hello() {
		return "hello spring security";
	}
}

/**
 * 1.springBoot来处理app端和浏览器端的访问,restlet用客户端发送的时候返回的是一串html文件而app则是一段json代码
 * BasicErrorController(ctrl+shift+t) 在springBoot内部
 * 
 * 
 */
